/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2013
 */

package com.smg.community.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import javacommon.base.*;
import javacommon.util.*;

import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;
import cn.org.rapid_framework.page.*;
import cn.org.rapid_framework.page.impl.*;

import com.smg.community.model.*;
import com.smg.community.dao.*;
import com.smg.community.service.*;
import com.smg.community.vo.query.*;

/**
 * @author badqiu email:badqiu(a)gmail.com
 * @version 1.0
 * @since 1.0
 */


public class SmgMemberFriend extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "SmgMemberFriend";
	public static final String ALIAS_SMFID = "smfid";
	public static final String ALIAS_MEMBER_ID_A = "memberIdA";
	public static final String ALIAS_MEMBER_ID_B = "memberIdB";
	public static final String ALIAS_FRIEND_DATE = "friendDate";
	
	//date formats
	public static final String FORMAT_FRIEND_DATE = DATE_FORMAT;
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
    /**
     * smfid       db_column: smfid 
     */	
	
	private java.lang.Integer smfid;
    /**
     * memberIdA       db_column: memberIdA 
     */	
	
	private java.lang.Integer memberIdA;
    /**
     * memberIdB       db_column: memberIdB 
     */	
	
	private java.lang.Integer memberIdB;
    /**
     * friendDate       db_column: friendDate 
     */	
	
	private java.util.Date friendDate;
	//columns END

	public SmgMemberFriend(){
	}

	public SmgMemberFriend(
		java.lang.Integer smfid
	){
		this.smfid = smfid;
	}

	public void setSmfid(java.lang.Integer value) {
		this.smfid = value;
	}
	
	public java.lang.Integer getSmfid() {
		return this.smfid;
	}
	public void setMemberIdA(java.lang.Integer value) {
		this.memberIdA = value;
	}
	
	public java.lang.Integer getMemberIdA() {
		return this.memberIdA;
	}
	public void setMemberIdB(java.lang.Integer value) {
		this.memberIdB = value;
	}
	
	public java.lang.Integer getMemberIdB() {
		return this.memberIdB;
	}
	public String getFriendDateString() {
		return DateConvertUtils.format(getFriendDate(), FORMAT_FRIEND_DATE);
	}
	public void setFriendDateString(String value) {
		setFriendDate(DateConvertUtils.parse(value, FORMAT_FRIEND_DATE,java.util.Date.class));
	}
	
	public void setFriendDate(java.util.Date value) {
		this.friendDate = value;
	}
	
	public java.util.Date getFriendDate() {
		return this.friendDate;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Smfid",getSmfid())
			.append("MemberIdA",getMemberIdA())
			.append("MemberIdB",getMemberIdB())
			.append("FriendDate",getFriendDate())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getSmfid())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof SmgMemberFriend == false) return false;
		if(this == obj) return true;
		SmgMemberFriend other = (SmgMemberFriend)obj;
		return new EqualsBuilder()
			.append(getSmfid(),other.getSmfid())
			.isEquals();
	}
}

